<template>
	<view class="">
		<view class="row pl-30 pr-30 pt-15">
			
			<view v-if="searchList" v-for="(item,index) in searchList" :key="index">
				<view v-if="item.type == 'select'">
					<view :class="item.class">
						<gt-drop-list  v-model="item.value" type="parent" :list="info[item.label]" :placeholder="item.name" ></gt-drop-list>
					</view>
				</view>
				<view v-else-if="item.type == 'input'">
					<input :class="item.class" v-model="item.value" type="text" :placeholder="item.name" />
				</view>
			</view>
			
			<slot name='formItem'></slot>
			
		</view>
	</view>
</template>

<script>
	export default {
		name: "gt-form-search",
		props: {
			info:{
				type:Object,
				default:function(){
					return {}
				}
			},
			searchList:{
				type:Array,
				default:function(){
					return []
				}
			}
		},
		data() {
			return {}
		},
		computed: {},
		methods: {
			search(){
				this.$emit('search')
			}
		}
	}
</script>

<style >
	
</style>
